using Microsoft.EntityFrameworkCore.Migrations;


namespace Server.Models.Data.UI;

/// <inheritdoc />
public partial class OpenIddict5Support : Migration
{
  /// <inheritdoc />
  protected override void Up(MigrationBuilder migrationBuilder)
  {
    migrationBuilder.RenameColumn(
        name: "Type",
        table: "OpenIddictApplications",
        newName: "ClientType");

    migrationBuilder.AddColumn<string>(
        name: "ApplicationType",
        table: "OpenIddictApplications",
        type: "TEXT",
        maxLength: 50,
        nullable: true);

    migrationBuilder.AddColumn<string>(
        name: "JsonWebKeySet",
        table: "OpenIddictApplications",
        type: "TEXT",
        nullable: true);

    migrationBuilder.AddColumn<string>(
        name: "Settings",
        table: "OpenIddictApplications",
        type: "TEXT",
        nullable: true);
  }

  /// <inheritdoc />
  protected override void Down(MigrationBuilder migrationBuilder)
  {
    migrationBuilder.DropColumn(
        name: "ApplicationType",
        table: "OpenIddictApplications");

    migrationBuilder.DropColumn(
        name: "JsonWebKeySet",
        table: "OpenIddictApplications");

    migrationBuilder.DropColumn(
        name: "Settings",
        table: "OpenIddictApplications");

    migrationBuilder.RenameColumn(
        name: "ClientType",
        table: "OpenIddictApplications",
        newName: "Type");
  }
}
